package PTA;
class SingleTest {
    private static int bucket = 100;
    private static SingleTest test = new SingleTest();
    public static SingleTest getInstance() {
        return test;
    }
    public void addobj() {
        System.out.println("当前的储量是"+(++bucket));
    }
    public void delOjb() {
        System.out.println("当前的储量是"+(--bucket));
    }
}
public class t8 {
    public static void main(String[] args) {
        SingleTest st1=SingleTest.getInstance();
        SingleTest st2=SingleTest.getInstance();
        st1.addobj();
        st2.delOjb();;
    }
}
